﻿using System.Security.Cryptography;
using System.Text;

namespace VueAdminService.Utils
{
	public class SecurityUtil
	{

		/// <summary>
		/// MD5加密
		/// </summary>
		/// <param name="text"></param>
		/// <returns></returns>
		public static string EncryptByMD5(string text)
		{
			using (MD5 md5 = MD5.Create())
			{
				byte[] data = md5.ComputeHash(Encoding.UTF8.GetBytes(text));
				return Convert.ToBase64String(data);
			}
		}
	}
}
